package com.szt.sy.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import com.szt.sy.controller.base.AdminBaseController;

/***
 * 首页
 * 
 * @author wwy shiqiyue.github.com
 *
 */
@Controller
@RequestMapping
public class IndexController extends AdminBaseController {
	
	/***
	 * 首页跳转
	 * 
	 * @return
	 */
	@GetMapping
	public String index() {
		if (getLoginUser() != null) {
			return "redirect:/admin/main";
		}
		return "redirect:/admin/login";
		
	}
}
